package com.mallcloud.mall.app.api.entity.vo;

import cn.hutool.core.annotation.Alias;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@ApiModel(value = "WxPay3UnifiedOrderResponseVO", description = "微信3统一支付")
@Data
public class WxPay3UnifiedOrderResponseVO implements Serializable {
	private static final long serialVersionUID = 1L;

	@ApiModelProperty("预支付交易会话标识")
	@JSONField(name = "prepay_id")
	@JsonProperty(value = "prepay_id")
    private String prepayId;


	@ApiModelProperty("APIv3密钥")
	private String appKey;
	@ApiModelProperty("交易类型")
	private String type;
	@ApiModelProperty("唤起支付请求参数")
	private SignObj signMap;

	@ApiModel(value = "SignObj", description = "微信3唤起支付请求参数")
	@Data
	public static class SignObj {

		@ApiModelProperty("应用编号")
		private String appId;
		private String nonceStr;
		private String timeStamp;
		@JSONField(name = "package")
		@JsonProperty(value = "package")
		@Alias("package")
		private String packageStr;
		private String signType;
	}

	@ApiModel(value = "SignJsApi", description = "微信3唤起支付请求参数")
	@Data
	public static class SignJsApi extends SignObj {
		private String paySign;
	}

	@ApiModel(value = "SignApp", description = "微信3唤起支付请求参数")
	@Data
	public static class SignApp extends SignObj {
	private String prepayId;
	private String sign;
		@JSONField(name = "partnerid")
		@JsonProperty(value = "partnerid")
		@Alias("partnerid")
	private String partnerId;
	}

}
